<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/view/feature/vochManage/vochCommon.php'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/svr/userManage/userMisc.php'; ?>
<?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/svr/com/fea/accMisc.php'; ?>

<style>
    .ui-autocomplete-category {
        font-weight: bold;
        padding: .2em .4em;
        margin: .8em 0 .2em;
        line-height: 1.5;
    }

    ul.ui-autocomplete >li >div {
        text-align:left;
    }
</style>

<script>
    <?php require_once $_SERVER['DOCUMENT_ROOT'] . '/accHestia/src/svr/init/acc_xml_builder.php'; ?>
    
    g_acc_list = {};
    g_prj_list = {};
    g_current_list = {};
    g_saleman = {};
    
    acc_load_data("acc_new_voch", g_acc_list);
    acc_load_data("project", g_prj_list);
    acc_load_data("current", g_current_list);
    acc_load_data("saleman", g_saleman);

    var g_acc_ways = [
        {label:'银行汇票', v:201},
        {label:'支票', v:202},
        {label:'商业汇票', v:203},
        {label:'银行本票', v:204},
        {label:'汇兑', v:205},
        {label:'委托收款', v:206},
        {label:'异地托收承付结算', v:207}
    ];
    
    var g_is_new_voch_empty = 1;
    var g_myName = '<?php echo get_user_name_by_loginId($_SESSION["loginedId"]);?>';
    var g_myId = '<?php echo get_user_id_by_loginId($_SESSION["loginedId"]);?>';
    
    $.widget( "custom.catcomplete", $.ui.autocomplete, {
        _create: function() {
            this._super();
            this.widget().menu( "option", "items", "> :not(.ui-autocomplete-category)" );
        },
        _renderMenu: function( ul, items ) {
            var that = this,
            currentCategory = "";
            $.each( items, function( index, item ) {
                if ( item.category != currentCategory ) {
                    ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
                    currentCategory = item.category;
                }
                that._renderItemData( ul, item );
            });
        }
    });

    function vouch_save_callback(ps_data) {
        if ("OK" != ps_data["result"]) {
            alert("保存失败!\n");
        } else {
            alert("保存成功");
            setNewVochGridBlank();
            upPzNewMainContent(ps_data);
            g_is_new_voch_empty = 1;
        }
    }
    
    function on_click_cancel_button() {
        var chg_objs = $("#id_new_voch_grid").getChangedCells();
        for(var i = 0; i < chg_objs.length; ++i) {
            var o = chg_objs[i];
            //console.log("i=" + i + "sumy:" + o.summary + ", cr:" + o.cr + ", accInfo:" + o.accInfo);
        }
    }
    
    function isDataValidationOK() {
        var chg_objs = $("#id_new_voch_grid").jqGrid('getRowData');//$("#id_new_voch_grid").getChangedCells();
        var sum_de = 0.0;//new Number(0.0);
        var sum_cr = 0.0;//new Number(0.0);
        
        //$('#id_new_voch_grid').jqGrid('getGridParam', 'data')
        //$("#id_new_voch_grid").jqGrid('getRowData')
        
        for(var i = 0; i < chg_objs.length; ++i) {
            var o = chg_objs[i];
            if(0 == parseFloat(o.cr) && 0 == parseFloat(o.de) && "" == o.accInfo) continue; //空行略过
            if("" != o.cr && isNaN(o.cr)) {alert("行" + (i + 1) + "贷方非数字!");return false;}
            if("" != o.de && isNaN(o.de)) {alert("行" + (i + 1) + "借方非数字!");return false;}
            if(0 != parseFloat(o.de) && 0 != parseFloat(o.cr)) {alert("行" + (i + 1) + "借贷只允许一方输入!");return false;}

            var isValid = false;
            for (var x = 0; x < g_acc_list.data.length; ++x) {
                if (g_acc_list.data[x].label == o.accInfo) {
                    isValid = true;
                    break;
                }
            }
            if (!isValid) {
                alert("第" + (i + 1) + "行的会计科目不合法,请从自动完成框的列表中选择填入.");
                return false;
            }
            if (0 != parseFloat(o.cr)) {//借不空
                sum_cr += parseFloat(parseFloat(o.cr).toFixed(2));
            } else {
                sum_de += parseFloat(parseFloat(o.de).toFixed(2));
            }
        }
        //校验:借贷平衡校验
        if (Math.abs(sum_de - sum_cr) > 0.0001) {
            alert("借贷合计不平衡!\n借方合计:" + sum_de + ", 贷方合计:" + sum_cr);
            return false;
        }
        return true;
    }

    function on_click_save_button() {//[保存]按钮押下
        var arr = [];//new Array(0);
        
        if(!isDataValidationOK()) {
            return;
        }
        
        //打包数据,准备发送
        var chg_objs = $("#id_new_voch_grid").jqGrid('getRowData');//$("#id_new_voch_grid").getChangedCells();
        for (var i = 0; i < chg_objs.length; ++i) {
            var o = chg_objs[i];
            if(0 == parseFloat(o.cr) && 0 == parseFloat(o.de) && "" == o.accInfo) continue; //空行略过

            var jo = {};//new Object();
            jo.zhaiyao = o.summary;

            //1101, 现金         -> 1101
            var kemu = o.accInfo;
            var pos = kemu.indexOf(",");
            if(-1 == pos) {
                alert("科目非法! \r\n" + kemu);
                return;
            }
            jo.kemuId = get_autoComp_value_by_label(g_acc_list.data, o.accInfo);//kemu.substring(0, pos);

            jo.auxCurrentId = get_autoComp_value_by_label(g_current_list.data, o.currentAcc);
            jo.auxSaleManId = get_autoComp_value_by_label(g_saleman.data, o.sales_man);
            jo.auxPrj1Id = get_autoComp_value_by_label(g_prj_list.data, o.prject1);
            jo.auxPrj2Id = get_autoComp_value_by_label(g_prj_list.data, o.prject2);
            jo.auxPrj3Id = get_autoComp_value_by_label(g_prj_list.data, o.prject3);
           
            jo.accWayId = get_autoComp_value_by_label(g_acc_ways, o.accWay);
            jo.accCloseNo = o.accCloseNo;
            jo.accCloseDate = o.accCloseDate;

            jo.de = parseFloat(o.de).toFixed(2);
            jo.cr = parseFloat(o.cr).toFixed(2);
            arr.push(jo);
        }

        call_rpc("vouch_save", {
                date:$("#id_new_voch_datepicker").val(),
                vochZiID:$("#ivochzi").val(),
                vochAttachCnt:$("#iAttachCnt").val(),
                id_acc_maker:g_myId,
                jours:arr,}, 
            vouch_save_callback);
    }

    function bind_all_control_func() {
        $("#id_lnav_newVoch").click(function() {
            if("firstShow" == $("#id_li_new_voch").attr("value"))  {
                call_rpc("pznew_a", {vochziid:"5",}, pznew_a_callback);
            } else {
                activatePanel("tabs", "id_tab_title_new_voch");
            }
        });

        $("#id_new_voch_datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: "yy-mm-dd",
            beforeShow: function() {
                setTimeout(function() {$('#ui-datepicker-div').css("z-index", 100);}, 100);
            },
            onSelect: function(dateText) {
                //console.log("Selected date: " + dateText + "; input's current value: " + this.value);
                $("tr#1 td[aria-describedby='id_new_voch_grid_summary']").click();
            },
        });

        $("#id_new_voch_datepicker").bind("keydown", onDateInputKeydown);
        $("#iAttachCnt").bind("keydown", onAttachTabEnter);//[附件数]响应Tab/Enter
        $("#ivochzi").bind("change", on_pingzhengZi_change);//bind [凭证字]变化事件
        $("#isave_voucher").bind("click", on_click_save_button); //bind [保存]事件
        $("#id_btn_cancel").bind("click", on_click_cancel_button);
        $("#id_autoNewVoch_forTest").bind("click", on_click_auto_test);
        $("#id_cbx_saleman").on("change", function() {
            if($(this).is(":checked")) {
                showOrHideColumn("id_new_voch_grid", "show", "sales_man");
            } else {
                showOrHideColumn("id_new_voch_grid", "hide", "sales_man");
            }
        })
        .change()
        ;
        $("#id_prj").on("change", function() {
            var v = $(this).val();
            if(0 == v) {
                showOrHideColumn("id_new_voch_grid", "hide", "prject1, prject2, prject3");
            } else if(1 == v) {
                showOrHideColumn("id_new_voch_grid", "show", "prject1");
                showOrHideColumn("id_new_voch_grid", "hide", "prject2, prject3");
            } else if(2 == v) {
                showOrHideColumn("id_new_voch_grid", "show", "prject1, prject2");
                showOrHideColumn("id_new_voch_grid", "hide", "prject3");
            } else if(3 == v) {
                showOrHideColumn("id_new_voch_grid", "show", "prject1, prject2, prject3");
            }
        })
        .change()
        ;
        showOrHideColumn("id_new_voch_grid", "hide", "currentAcc, accWay, accCloseNo, accCloseDate");
    }
    
    function on_click_auto_test() {
        var ir = getRandInt(0, 15);
        $("#iAttachCnt").val(ir);

        var d = $("#id_new_voch_datepicker").val();
        //var day = getRandInt(1, 28);
        //day = (day < 10? "0" + day : day + "");
        $("#id_new_voch_datepicker").val(d.substring(0, 4) + "-" + d.substring(5, 7) + "-" + getRandInt(1, 28));
        
        var rnd_idx = getRandInt(0, g_acc_list.data.length - 1);
        var rnd_acc = g_acc_list.data[rnd_idx].label;
        
        var rnd_money = getRandFloat(1, 10000).toFixed(2);

        var grid_items_count = 5;
        var gridArrayData = [];
        var rnd_summry = getRandInt(1, 5000);
        day = getRandInt(1, 28);
        gridArrayData.push({
            row_id: 1, summary: "summ" + rnd_summry, 
            accInfo: rnd_acc,
            currentAcc:g_current_list.data[getRandInt(0, g_current_list.data.length - 1)].label, 
            sales_man: g_saleman.data[getRandInt(0, g_saleman.data.length - 1)].label, 
            prject1: g_prj_list.data[getRandInt(0, g_prj_list.data.length - 1)].label,
            prject2: g_prj_list.data[getRandInt(0, g_prj_list.data.length - 1)].label, 
            prject3: g_prj_list.data[getRandInt(0, g_prj_list.data.length - 1)].label,
            accWay: g_acc_ways[getRandInt(0, g_acc_ways.length - 1)].label,
            accCloseNo: 'No.' + getRandInt(10000, 99999),
            accCloseDate: d.substring(0, 4) + "-" + d.substring(5, 7) + "-" + getRandInt(1, 28),
            cr: '', de: rnd_money
        });

        rnd_idx = getRandInt(0, g_acc_list.data.length - 1);
        rnd_acc = g_acc_list.data[rnd_idx].label;
        gridArrayData.push({
            row_id: 2, summary: "summ" + rnd_summry, 
            accInfo: rnd_acc, sales_man: '', 
            prject1: '', prject2: '', 
            prject3: '', cr: rnd_money, de: ''
        });

        $("#id_new_voch_grid").jqGrid('setGridParam', { data: gridArrayData});
        $("#id_new_voch_grid").trigger('reloadGrid');  
    }
    
    function onAttachTabEnter(event){//原始单据Tab或Enter按下时,跳到会计分录首位
        if ((9 == event.which) || (13 == event.which)){
            event.preventDefault();
            $("#id_new_voch_datepicker").select();
        }
    }
    function onDateInputKeydown(event){//原始单据Tab或Enter按下时,跳到会计分录首位
        if ((9 == event.which) || (13 == event.which)){
            event.preventDefault();
            $("tr#1 td[aria-describedby='id_new_voch_grid_summary']").click();
        }
    }

    function on_pingzhengZi_change() {//凭证字选择时变化时
        if(g_is_new_voch_empty || confirm("凭证字切换后,已经输入的信息会丢失.\n要切换吗?")) {
            call_rpc("vochzi_changed_req", {vochziid:$(this).val(),}, function(ps_data) {
                setNewVochGridBlank();
                upPzNewMainContent(ps_data);
                $("#id_newvoch_title").attr("aria-voch_type", $("#ivochzi").val());
            });
        }
    }

    function upPzNewMainContent(ps_data) {
        $("#ipz_flowNo").text(ps_data["FlowWaterNum"]);
        if(undefined != typeof(ps_data["VochDate"])) {
            $("#id_new_voch_datepicker").val(ps_data["VochDate"]);
        }
        $("#ivochNo").text(ps_data["VochNo"]);
        //console.log("FlowWaterNum=%d, VochDate=%s, VochNo=%s", ps_data["FlowWaterNum"], ps_data["VochDate"], ps_data["VochNo"]);
        $("#iAttachCnt").text("");
        $("#iAttachCnt").select();
    }

    function setNewVochGridBlank() {
        var grid_items_count = 5;
        var gridArrayData = [];
        for (var i = 0; i < grid_items_count; i++) {
            gridArrayData.push({
                row_id: i + 1, summary: '', accInfo: '', 
                currentAcc: '', sales_man: '', 
                prject1: '', prject2: '', prject3: '', 
                accWay: '', accCloseNo: '', accCloseDate: '',
                de: '', cr: ''
            });
        }
        $("#id_new_voch_grid").jqGrid('setGridParam', { data: gridArrayData});
        $("#id_new_voch_grid").trigger('reloadGrid');  
    }

    function pznew_a_callback(ps_data) {
        if("OK" == ps_data["result"]) {
            $("#id_li_new_voch").attr("value", "notFirstShow");
            setNewVochGridBlank();
            $('#id_tab_title_new_voch').closest('li').show();
            $("#tabs").tabs("refresh");                            
            activatePanel("tabs", "id_tab_title_new_voch");                            
            upPzNewMainContent(ps_data);
            $("#ivochzi").find("[value='5']").attr("selected", "selected"); //转字优先
            $("#id_newvoch_title").attr("aria-voch_type", 5);
        } else {
            alert("failed");
        }
    }

    $(document).ready(function(){
        new_voch_grid_init();
        bind_all_control_func();
        $("#id_acc_maker").text(g_myName);
    });

    function fn_beforeEditCell(rowid, cellname, value, iRow, iCol) {
        //console.log('-----' + rowid + ", " + cellname + ", " + value + ", " + iRow + ", " + iCol);
        $('#id_new_voch_grid').data("lastActiveCellInfo", {l_rowid: iRow, l_iCol: iCol});
        $('#id_new_voch_grid').data("isNeedCloseEdit", true);
    }
    function fn_cell_select(rowid, colname, value, iRow, iCol) {
        $("#" + rowid + "_" + colname).bind("focus", function(){
            this.select();
        });
        
        if("accInfo" == colname) {
            $(":input[name='accInfo']").catcomplete({
                delay: 0, source: g_acc_list.data
            });
        } else if("sales_man" == colname) {
            make_auto_complete(":input[name='sales_man']", g_saleman.data);
        } else if("prject1" == colname) {
            make_auto_complete(":input[name='prject1']", g_prj_list.data);
        } else if("prject2" == colname) {
            make_auto_complete(":input[name='prject2']", g_prj_list.data);
        } else if("prject3" == colname) {
            make_auto_complete(":input[name='prject3']", g_prj_list.data);
        } else if("accCloseDate" == colname) {
            $(":input[name='accCloseDate']").datepicker({
                changeMonth: true,
                changeYear: true,
                dateFormat: 'yy-mm-dd',
                showOn: 'focus',
            });
        }
    }
    function onAfterSaveCell(rowid, cellname, value, iRow, iCol) {
        g_is_new_voch_empty = 0;
        return false;
    }
    
    function onCrKeyDown(e) {
        var key = e.charCode || e.keyCode;
        if (key == 9) { //tab
            var grid = $('#id_new_voch_grid');
            var selectedRowId = grid.jqGrid ('getGridParam', 'selrow');
            
            //Save editing for current row
            //grid.jqGrid('saveRow', selectedRowId, false, 'clientArray');
          
            //If at bottom of grid, create new row
            if (selectedRowId++ == grid.getDataIDs().length) {
                grid.addRowData(selectedRowId, {});
            }
            //Enter edit next row's first col cell
            setTimeout(function() {grid.jqGrid('editCell', selectedRowId, 0, true);}, 20);
        }
    }
    function onAccKeyDown(e) {
        var key = e.charCode || e.keyCode;
        if (key == 9 || 13 == key) { //tab
            var grid = $('#id_new_voch_grid');
            var selectedRowId = grid.jqGrid ('getGridParam', 'selrow');
            var colIndex = 1;
            var cntPrj = $("#id_prj").val();
            if($("#id_cbx_saleman").is(':checked')) {
                colIndex = 2; //业务员核算
            } else if(cntPrj > 0){
                colIndex = 3; //核算项目1
            } else {
                colIndex = 6; //借方
            }
            setTimeout(function() {grid.jqGrid('editCell', selectedRowId, colIndex, true);}, 20);
        }
    }

// cellValue = myGrid.jqGrid ('getCell', selectedRowId, 'columnName');
    function new_voch_grid_init(){
        $("#id_new_voch_grid").jqGrid({
                    colModel: [
                        //{label: 'No.', name: 'row_id', width: 50},
                        {label: '摘要', name: 'summary', width: 150, editable: true, edittype:"text"},
                        {label: '会计科目', name: 'accInfo', width: 130, editable: true, edittype:"text",
                            editoptions: {dataEvents: [{type: 'keydown', fn: onAccKeyDown,}]}
                        },
                        {label: '借方金额', name: 'de', width: 100, formatter: 'number', align:'right', editable: true, edittype:"text"},
                        {label: '贷方金额', name: 'cr', width: 100, formatter: 'number', align:'right', editable: true, edittype:"text",
                            // listens for the tab button being pressed
                            editoptions: {
                                dataInit: function (elem) { $(elem).focus(function () { this.select(); }); },
                                dataEvents: [{type: 'keydown', fn: onCrKeyDown,}]
                            }
                        },
                        {label: '核算往来', name: 'currentAcc', width: 120, editable: true, edittype:"text",
                            editoptions: {dataEvents: [{type: 'keydown', fn: onAccKeyDown,}]}
                        },
                        {label: '核算(业务员)', name: 'sales_man', width: 90, editable: true, edittype:"text",},
                        {label: '核算(项目1)', name: 'prject1', width: 90, editable: true, edittype:"text"},
                        {label: '核算(项目2)', name: 'prject2', width: 90, editable: true, edittype:"text"},
                        {label: '核算(项目3)', name: 'prject3', width: 90, editable: true, edittype:"text"},

                        {label: '结算方式', name: 'accWay', width: 80, editable: true, edittype:"text"},
                        {label: '结算票号', name: 'accCloseNo', width: 80, editable: true, edittype:"text"},
                        {label: '结算日期', name: 'accCloseDate', width: 90, editable: true, edittype:"text",
                            editoptions: {dataEvents: [{type: 'keydown', fn: onAccKeyDown,}]}
                            // editoptions: {
                                // dataInit: function (element) {
                                    // $(element).datepicker({
                                        // id: 'accCloseDate_datePicker',
                                        // dateFormat: 'yy-mm-dd',
                                        // minDate: new Date(1990, 0, 1),
                                        // maxDate: new Date(2100, 0, 1),
                                        // showOn: 'focus'
                                    // });
                                // }
                            // }
                        },


                    ],
                    shrinkToFit:true,
                    viewrecords: true,
                    width: 958,
                    height: 'auto',
                    rowNum: 15,
                    datatype: 'local',
                    hoverrows: false,
                    pager: "#id_new_voch_pager",
                    //onSelectRow: func_on_select_row,
                    beforeEditCell: fn_beforeEditCell,
                    afterEditCell: fn_cell_select,
                    // afterRestoreCell:function() {console.log("afterRestoreCell");}, 
                    afterSaveCell: onAfterSaveCell, 
                    // afterSubmitCell:function() {console.log("afterSubmitCell");}, 
                    // beforeEditCell:function() {console.log("beforeEditCell");}, 
                    // beforeSaveCell:function() {console.log("beforeSaveCell");}, 
                    // beforeSubmitCell:function() {console.log("beforeSubmitCell");}, 
                    // errorCell:function() {console.log("errorCell");}, 
                    // formatCell:function() {console.log("formatCell");}, 
                    // onSelectCell:function() {console.log("onSelectCell");}, 
                    // serializeCellData:function() {console.log("serializeCellData");}, 
                    //gridComplete: function() {console.log("gridComplete");},
                    
                    cellEdit: true,
                    cellsubmit: "clientArray",
                    cmTemplate: {title: false, sortable:false,}, // do not show tooltips on grid
                    
                });
        //$("#id_new_voch_grid").jqGrid('navGrid', '#id_new_voch_pager', {edit : false,add : false,del:false});
        $("#id_new_voch_grid").jqGrid('bindKeys');
        $("#id_new_voch_grid").parents('div.ui-jqgrid-bdiv').css("max-height","330px");
        //$("#id_new_voch_grid").parents('div.ui-jqgrid-bdiv').css("width","960px");
        
        fix_jqgrid_header_and_body_width_bug("id_new_voch_grid");
        
        $(document).click(function(e) {
            //e.preventDefault();
            var clickedElement = e.target;      
            //if the click event happened outside the grid 
            if($("#id_new_voch_grid").has(clickedElement).size() < 1){
                var lastCell = $('#id_new_voch_grid').data("lastActiveCellInfo");
                if("undefined" != typeof lastCell && $('#id_new_voch_grid').data("isNeedCloseEdit")) {
                    $("#id_new_voch_grid").jqGrid("editCell", lastCell.l_rowid, lastCell.l_iCol, false);
                    $('#id_new_voch_grid').data("isNeedCloseEdit", false);
                    //e.preventDefault();
                }
            }
        });
    }
</script>

<div id="new_voch_main" style="height:567px;">
    <div id="new_voch_btn_div" style="margin-bottom:0px; height:40px; ">
        <div class="BtnLeftArrangeFirst" ><button id="isave_voucher" style="height:30px; width:70px;" class="ui-widget ui-button ui-corner-all">保存</button></div>
        <div class="BtnLeftArrange" ><button style="height:30px; width:70px;" id="id_btn_cancel" class="ui-widget ui-button ui-corner-all">取消</button></div> 
        <div class="BtnLeftArrange" ><button style="height:30px; width:70px;" id="id_autoNewVoch_forTest" class="ui-widget ui-button ui-corner-all">自动</button></div>
        <div class="BtnRightArrangeFirst" style="padding-right:40px;" >
            <fieldset>
                <legend>选择辅助核算: </legend>
                <div class="BtnRightArrange">
                    <span>核算项目 
                        <select name="nPrj" id="id_prj" style="background-color:#FAEBD7;">
                            <option value="0" selected="selected">无</option>
                            <option value="1" >1个</option>
                            <option value="2" >2个</option>
                            <option value="3" >3个</option>
                        </select>
                    </span>
                </div>
                <div class="BtnRightArrangeFirst">
                    <label for="id_cbx_saleman">业务员
                      <input type="checkbox" name="id_cbx_saleman" id="id_cbx_saleman">
                    </label>
                </div>
            </fieldset>
        </div>
    </div>

    <div id="pz_new_heaer">
        <div class="pz_new_header_left">
            <p class="pz_new_sxh">流水号： <span class="pz_new_hr" id="ipz_flowNo" title="会在提交时重新计算,此号仅供参考"> -1</span> </p>
            附单据： <span><input type="text" id="iAttachCnt" value="0" style="width:30px; background-color:#FAEBD7;"/></span>张<br/>
        </div>
        <div class="pz_new_header_middle">
            <div class="jzpztitle" id="id_newvoch_title" style=" position: relative; top:-20px;">记账凭证</div>
            <p class="pz_new_date">Date: <input type="text" style="background-color:#FAEBD7;" id="id_new_voch_datepicker" value="1990-1-1"/></p>
        </div>
        <div class="pz_new_header_right">
            <div>凭证字： 
                <select name="vochZi" id="ivochzi" style="background-color:#FAEBD7;">
                    <?php echo get_voch_zi_option_list();?>
                </select>
            </div>
            <div>
                凭证号： <span class="pz_new_hr" id="ivochNo" title="会在提交时重新计算,此号仅供参考">0</span>
            </div>
        </div>
    </div>
    <div class="pz_new_body" style="width:960px;">
        <table id="id_new_voch_grid"></table> 
        <div id="id_new_voch_pager"></div>
    </div>
    <div style="float:left; margin-left:50px; margin-top:5px;">
        <div class="acc_div_css">会计主管:<span id="id_acc_manager" class="acc_doer"></span></div>
        <div class="acc_div_css">审核:<span id="id_acc_reviewer" class="acc_doer"></span></div>
        <div class="acc_div_css">记账:<span id="id_acc_booker" class="acc_doer"></span></div>
        <div class="acc_div_css">制单:<span id="id_acc_maker" class="acc_doer"></span></div>
    </div>
</div>